package com.glorysoft.xztpda.bindingadapter

import android.graphics.Color
import android.graphics.drawable.Drawable
import android.text.Editable
import android.text.TextWatcher
import android.widget.EditText
import android.widget.LinearLayout
import android.widget.TextView
import androidx.databinding.BindingAdapter
import com.glorysoft.xztpda.R
import com.glorysoft.xztpda.entity.LotInfoEntity
import java.lang.NumberFormatException

/**
 * FileName: NumEditextAdapter
 * Author: XJH
 * Date: 2022/4/28 18:34
 * Description:
 * History:
 */
object MatBgAdapter {

    @BindingAdapter(value = ["matBgCol"], requireAll = false)
    @JvmStatic
    fun setMatBg(llLayout: LinearLayout, material: LotInfoEntity.Material) {
        if (material.isShowAdd){
            llLayout.setBackgroundColor(Color.rgb(248,203,183))
        }else{
            llLayout.setBackgroundColor(Color.WHITE)
        }
    }
}